﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace _6i
{
    public partial class MainFrm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //  
        }
        
        protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            Response.Cookies.Add(new HttpCookie("mode", "edit"));
            //Response.Cookies.Add( new HttpCookie( "contactID", e.CommandArgument.ToString() ) );
            Response.Cookies.Add(new HttpCookie("contactID", (Convert.ToInt32(e.CommandArgument.ToString()) + 1).ToString()));
            Response.Redirect("ContactEdit.aspx");
        }
        
        protected void btnAddContacat_Click(object sender, EventArgs e)
        {
            Response.Cookies.Add(new HttpCookie("mode", "add"));
            Response.Redirect("ContactAdd.aspx");
        }

    }
}